<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>玩家信息</title>
    <style>
        body {
            margin: 0;
            padding: 20px;
            background: #f5f5f5;
            font-family: "Microsoft YaHei", sans-serif;
        }
        .container {
            max-width: 800px;
            margin: 0 auto;
            background: white;
            border-radius: 12px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            padding: 20px;
        }
        .header {
            /* 设置相对定位,用于子元素绝对定位的参考 */
            position: relative;
            /* 使用flex布局,使子元素水平排列 */
            display: flex;
            /* 垂直居中对齐 */
            align-items: center;
            /* 底部外边距 */
            margin-bottom: 20px;
            /* 内边距 */
            padding: 0px 10px;
            /* 底部边框 */
            border-bottom: 2px solid #f0f0f0;
            /* 最小高度,确保内容不会太挤 */
            min-height: 140px;
            /* 最大高度,防止内容过多 */
            max-height: 180px;
            /* 超出部分隐藏 */
            overflow: hidden;
        }
        .name-plate {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 100%;
            height: auto;
            min-height: 100%;
            object-fit: contain;
            z-index: 0;
            opacity: 0.9;
        }
        .avatar {
            position: relative;
            margin-right: 20px;
            z-index: 1;
            flex-shrink: 0;
            width: 100px;
        }
        .icon {
            width: 90px;
            height: 90px;
            border-radius: 45px;
            object-fit: cover;
            border: 3px solid white;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }
        .info {
            flex: 1;
            position: relative;
            z-index: 1;
            padding: 10px;
            max-width: 70%;
        }
        .bottom-info {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            margin-top: 20px;
        }
        .friend-code {
            color: #999;
            font-size: 12px;
        }
        .game-stats {
            display: flex;
            gap: 15px;
            align-items: center;
            margin-bottom: 8px;
        }
        .stat-item {
            display: flex;
            align-items: center;
            gap: 5px;
            color: #fff;
            text-shadow: 0 1px 2px rgba(0,0,0,0.3);
        }
        .stat-item img {
            height: 24px;
            width: auto;
        }
        .stat-item.class-rank img {
            height: 35px;
            width: auto;
        }
        .name {
            font-size: 24px;
            font-weight: bold;
            color: #fff;
            margin-bottom: 8px;
            text-shadow: 0 2px 4px rgba(0,0,0,0.3);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .rating {
            display: inline-block;
            background: linear-gradient(45deg, #FFD700, #FFA500);
            color: white;
            padding: 4px 12px;
            border-radius: 15px;
            font-weight: bold;
            margin-bottom: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            font-size: 14px;
        }
        .details {
            display: flex;
            flex-direction: column;
            gap: 20px;
            margin-top: 20px;
            position: relative;
            z-index: 1;
        }
        .detail-item {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            transition: all 0.3s ease;
            position: relative;
        }
        .detail-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        .detail-label {
            color: #666;
            font-size: 14px;
            margin-bottom: 5px;
        }
        .detail-value {
            color: #333;
            font-weight: bold;
        }
        .asset-id {
            font-size: 11px;
            color: #888;
            font-family: monospace;
            background: rgba(0, 0, 0, 0.05);
            padding: 1px 4px;
            border-radius: 4px;
            position: absolute;
            top: 8px;
            right: 8px;
            opacity: 0.8;
        }
        .footer {
            text-align: right;
            color: #999;
            font-size: 12px;
        }
        .detail-group {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }
        .detail-group-title {
            grid-column: 1 / -1;
            color: #666;
            font-size: 16px;
            padding-bottom: 5px;
            border-bottom: 1px solid #eee;
            margin-bottom: 10px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <img class="name-plate" src="{{plateAsset}}" alt="姓名框">
            <div class="avatar">
                <img class="icon" src="{{iconAsset}}" alt="头像">
            </div>
            <div class="info">
                <div class="name">{{name}}</div>
                <div class="game-stats">
                    <div class="stat-item">
                        <img src="{{courseRankAsset}}" alt="段位">
                    </div>
                    <div class="stat-item class-rank">
                        <img src="{{classRankAsset}}" alt="阶级">
                    </div>
                    <div class="stat-item">
                        ⭐{{star}}
                    </div>
                </div>
                <div class="rating">Rating: {{rating}}</div>
            </div>
        </div>
        
        <div class="details">
            <div class="detail-group">
                <div class="detail-group-title">玩家装扮</div>
                <div class="detail-item">
                    <span class="asset-id">ID: {{icon.id}}</span>
                    <div class="detail-label">头像</div>
                    <div class="detail-value">
                        {{icon.name}} ({{icon.genre}})
                    </div>
                </div>
                <div class="detail-item">
                    <span class="asset-id">ID: {{name_plate.id}}</span>
                    <div class="detail-label">姓名框</div>
                    <div class="detail-value">
                        {{name_plate.name}} ({{name_plate.genre}})
                    </div>
                </div>
                <div class="detail-item">
                    <span class="asset-id">ID: {{frame.id}}</span>
                    <div class="detail-label">背景框</div>
                    <div class="detail-value">
                        {{frame.name}} ({{frame.genre}})
                    </div>
                </div>
                <div class="detail-item">
                    <span class="asset-id">ID: {{trophy.id}}</span>
                    <div class="detail-label">称号</div>
                    <div class="detail-value">
                        {{trophy.name}}
                    </div>
                </div>
            </div>
        </div>
        
        <div class="bottom-info">
            <div class="friend-code">好友码: {{friend_code}}</div>
            <div class="footer">最后更新时间: {{upload_time}}</div>
        </div>
    </div>
</body>
</html>
